package com.wjmj.balloon.debugger.actions;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.actions.ActionGroup;

import balloondebugger.Activator;

public class VariableActionGroup extends ActionGroup {

	private Action tnames_coAction;
	private Action var_cntnt_prvdrAction;
	private Action collapseallAction;

	@Override
	public void fillActionBars(IActionBars actionBars) {
		if (actionBars == null)
			return;

		makeActions();

		IToolBarManager toolBarManager = actionBars.getToolBarManager();
		toolBarManager.add(tnames_coAction);
		toolBarManager.add(var_cntnt_prvdrAction);
		toolBarManager.add(collapseallAction);
	}

	private void makeActions() {

		// tnames_co
		tnames_coAction = new Action() {
			public void run() {
				// TODO do tnames_co
			}
		};
		tnames_coAction.setToolTipText("Show Types Names");
		tnames_coAction.setImageDescriptor(Activator
				.getImageDescriptor("icons/variable/tnames_co.gif"));

		// var_cntnt_prvdr
		var_cntnt_prvdrAction = new Action() {
			public void run() {
				// TODO do var_cntnt_prvdr
			}
		};
		var_cntnt_prvdrAction.setToolTipText("Show Logical Structure");
		var_cntnt_prvdrAction.setImageDescriptor(Activator
				.getImageDescriptor("icons/variable/var_cntnt_prvdr.gif"));

		// collapseall
		collapseallAction = new Action() {
			public void run() {
				// TODO do collapseall
			}
		};
		collapseallAction.setToolTipText("Collapse All");
		collapseallAction.setImageDescriptor(Activator
				.getImageDescriptor("icons/variable/collapseall.gif"));

	}

}
